package Euler53;

import java.math.BigInteger;
import java.util.*;

public class CombinatoricSelections {
	public static void main(String[] args) {
		final BigInteger mil = new BigInteger(String.valueOf(1000000));
		
		List<BigInteger> fac = new ArrayList<BigInteger>();
		fac.add(BigInteger.ONE);
		int sum = 0;
		
		//System.out.println("Working...");
		
		for(int i = 1; i <= 100; i++)
		{
			int count = 0;
			BigInteger n = fac.get(i-1).multiply(new BigInteger(String.valueOf(i)));
			fac.add(n);
			
			for(int j = 1; j < i; j++)
			{
				BigInteger r = fac.get(j);
				BigInteger rn = fac.get(i-j);
				BigInteger ncr = n.divide(r.multiply(rn));
				
				if(ncr.compareTo(mil)>=0)
				{
					count++;
				}
			}
			
			sum += count;
		}
		
		System.out.println(sum);
	}
}